{% set page_title = title %}

{% extends theme("message/message_layout.html") %}

{% block message_content %}
{% from theme("macros.html") import render_submit_field, render_quickreply, render_field %}
<form class="form-horizontal" role="form" method="post">
    {{ form.hidden_tag() }}
    <div class="panel page-panel">
        <div class="panel-heading page-head">
            {{ title }}
        </div>

        <div class="panel-body page-body">
            {{ form.hidden_tag() }}
            <div class="col-md-12 col-sm-12 col-xs-12">

                {{ render_field(form.to_user, div_class="col-md-6 col-sm-6 col-xs-6") }}
                {{ render_field(form.subject, div_class="col-md-6 col-sm-6 col-xs-6") }}

                <div class="form-group">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="editor-box">
                            <div class="editor">
                                {{ render_quickreply(form.message, div_class="new-message", rows=7, cols=75, placeholder="", **{'data-provide': 'markdown', 'data-autofocus': 'false', 'class': 'flaskbb-editor'}) }}
                            </div>
                            <div class="editor-submit">
                                <div class="pull-right">
                                    {{ render_submit_field(form.send_message, input_class="btn btn-success") }}
                                    {{ render_submit_field(form.save_message, input_class="btn btn-info") }}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {% include theme('editor_help.html') %}
</form>
{% endblock %}
